package com.hyts.standard.webflux.r2db.dao;

import com.hyts.standard.webflux.bean.po.UserPO;
import org.springframework.data.r2dbc.repository.Query;
import org.springframework.data.repository.reactive.ReactiveCrudRepository;
import reactor.core.publisher.Flux;

/**
 * @author wayne
 * @version UsersDao,  2020/9/13
 */
public interface UsersDao
        extends ReactiveCrudRepository<UserPO, Long> {

    /**
     * 操作获取相关的数据信息模型
     * @param userName
     * @return
     */
    @Query("select id, deleted, createDate,updateDate,status,userName,realName,phone,birthday " +
           "from user c where c.lastname = :lastname")
    Flux<UserPO> findAllByUserName(String userName);
}
